(define (same-parity a . b)
  (define (iter list1 list2)
    (cond ((null? list2) list1 )
          ((= (remainder (+ (car list1) (car list2)) 2) 0) (iter (append list1 (list (car list2))) (cdr list2))) 
          (else (iter list1 (cdr list2)))))
  (iter (list a) b))
